Hybris UX Api icon

Hybris UX Api

(0 reviews)

GET searchTimeSlot

GET

This operation retrieves a SearchTimeSlot entity. This API is used to get available time slots for below mentioned use cases,

Use Case 1: Get Available timeslots for Technician visits for installation**
Available Datetime is based on the Puerto Rico timezone by default.
requestedEndDate is not used to search the TimeSlot. BSS reserve this element for future use.
jobType, jobNumber, houseId, orderId and requestedStartDate are required to retrieve Timeslot for Technician visit.

Use Case 2: Get available delivery slots
The delivery time retrieved from the backend system is in UTC. Available Datetime is based on the Puerto Rico timezone by default. The front end needs to make the date changes based on the timezone to display it to customers.
relatedPlace.id & jobType with value "delivery" are required to retreive Delivery Timeslot

URL

https://[localhost]:[port]/ecom-ux/v1/{businessId}/searchTimeSlot

URL PARAMS

nametypedescriptionrequired
businessIdstring2 letter ISO 3166 country code (TT, BB, JM, PA, PR etc.) identifying the business unit. PR is in scopeY
namevaluedescriptionrequired
client-idstringThe client_id identifying the channel.Y
client-secretstringPassword associated with the client_id.Y
X-Correlation-IDstringAn identifier for the current call chain that can be used to tie together log entries on multiple layers (e.g. client, server, mainframe). This identifier must be designed to be unique across all applications.
Note - Mule default behavior creates a sample x-correlation-id field if value is not passed from client, API will use this value in case value is not passed in API request
N
channelIdstringBy default channelId is ECOM, so Channel to business:
Example: "ECOM"
N
lobstringThe Line of Business Identifier currently available are:
FIXED
PREPAID
POSTPAID.
Y
X-Conversation-IdstringConversation Id. Required for Installation appointmentY/N

QUERY PARAMS

nametypedescriptionrequired
relatedPlace.idstringUnique identifier of the place. Mandatory for delivery appointment.Y/N
houseIdstringHouse id. Contains the location number. Mandatory for installation appointment.Y/N
jobNumberstringJob Number. Contains the sequence number of the job within the order. Default value is '0001'Y
requestedStartDatedateContains the first date when you can schedule the job.Y
requestedEndDatedaterequested end date for looking for available slots.N
orderIdstringContains the order number for appointment slot. Mandatory for installation appointment.Y/N
jobTypestringJob type which is looking for appointment slot. For delivery slot use "delivery".
For installation Timeslot, use valid values from quote Api response example: FN
Y

Response

Delivery Timeslot:PR

[{
    "id": "1256",
    "searchDate": "2022-09-11T14:40:43.000-04:00",
    "searchResult": "success",
    "status": "opened",
    "relatedPlace": {
         "id": "00605",
         "name": "Delivery Address",
         "@referredType": "GeographicAddress"
     },
    "availableTimeSlot": [
        {
            "validFor": {
                "startDateTime": "2022-09-15T10:00:00.000-04:00"
            }
        },
        {
            "validFor": {
                "startDateTime": "2022-09-16T10:30:00.000-04:00"
            }
        }
    ]
}]

Installation Timeslot: PR

[
    {
        "id": "0000000000009841",
        "status": "done",
        "searchResult": "success",
        "relatedPlace": {
            "id": "00918424400938",
            "role": "installationAddress",
            "@referredType": "GeographicAddress"
        },
        "requestedTimeSlot": [
            {
                "validFor": {
                    "startDateTime": "2022-09-30T00:00:00.000-04:00",
                    "endDateTime": "2022-10-07T00:00:00.000-04:00"
                }
            }
        ],
        "availableTimeSlot": [
            {
                "validFor": {
                    "startDateTime": "2022-11-28T08:00:00.000-04:00",
                    "endDateTime": "2022-11-28T12:00:00.000-04:00"
                }
            },
            {
                "validFor": {
                    "startDateTime": "2022-11-28T13:00:00.000-04:00",
                    "endDateTime": "2022-11-28T17:00:00.000-04:00"
                }
            },
            {
                "validFor": {
                    "startDateTime": "2022-11-29T08:00:00.000-04:00",
                    "endDateTime": "2022-11-29T12:00:00.000-04:00"
                }
            },
            {
                "validFor": {
                    "startDateTime": "2022-11-29T13:00:00.000-04:00",
                    "endDateTime": "2022-11-29T17:00:00.000-04:00"
                }
            },
            {
                "validFor": {
                    "startDateTime": "2022-11-30T08:00:00.000-04:00",
                    "endDateTime": "2022-11-30T12:00:00.000-04:00"
                }
            },
            {
                "validFor": {
                    "startDateTime": "2022-11-30T13:00:00.000-04:00",
                    "endDateTime": "2022-11-30T17:00:00.000-04:00"
                }
            }
        ]
    }
]

Possible response error

In this section all the possible data structures received by the client are defined and that must be considered as unsatisfactory when responding to the method.

[ 400 ]

Bad Request - the request could not be understood by the server due to malformed syntax. The client SHOULD NOT repeat the request without modifications.

{
  "errors" : [{
      "code" : 400,
      "message" : "Invalid Input",
      "description" : "Zipcode field can only be 5 characters long."
    }]
}
[ 404 ]

Not Found - server has not found a resource with that URI. This may be temporary and permanent condition. This status code is commonly used when the server does not wish to reveal exactly why the request has been refused, or when no other response is applicable.

{
  "errors" : [{
      "code" : 404,
      "message" : "delivery intents not found",
      "description" : "The requested operation failed because a delivery-intents resource associated with the request could not be found."
    }]
}

Reviews